<div class="wrapper-md" ng-controller="purchasingReturn">
    <toaster-container toaster-options="{'position-class': 'toast-top-center', 'close-button':true}"></toaster-container>
    <div ng-if="warehouseList" class="panel panel-default">
        <div class="panel-heading">
            {{title.title}}
            <button ng-click="warehouseJump()"  style="float: right;margin-top: -5px;margin-left:5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>新建
            </button>
            <button style="float: right;margin-left: 5px;margin-top: -5px;" class="btn m-b-xs btn-sm btn-success btn-addon">
                <i class="fa fa-file-excel-o"></i><a ng-click="excel()" download="导出Excel" id="excelOut" href="#">导出</a>
            </button>
            <button ng-click="searchTableShow = !searchTableShow"  style="float: right;margin-top: -5px;margin-left:5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-arrows-v"></i>精确搜索
            </button>
            <button ng-click="actions.closeAll()"  style="float: right;margin-top: -5px;margin-left:5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-minus-square-o"></i>批量收起
            </button>
            <button ng-click="actions.openAll()"  style="float: right;margin-top: -5px;margin-left:5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-plus-square-o"></i>批量展开
            </button>
        </div>
        <div ng-if="searchTableShow" class="panel-body b-b b-light">
            <table class="table m-b-none" id="searchTable">
                <tbody>
                <tr>
                    <td class="myLabel">制单人</td>
                    <td>
                        <input id="searchZdr" placeholder="点击选择" ng-click="showSelectUser('searchZdr','searchZdrId')" readonly type="text" class="form-control input-sm w-sm inline m-r"/>
                        <input id="searchZdrId" style="display:none" type="text"/>
                    </td>
                    <td class="myLabel">制单日期</td>
                    <td>
                        <div style="display: inline" ng-controller="DatepickerDemoCtrl">
                            <input id="searchStart" style="width:80px;float: left" ng-click="open($event)" readonly type="text" class="form-control input-sm w-sm inline m-r"
                                   datepicker-popup="{{format}}" ng-model="dt" is-open="opened"
                                   datepicker-options="dateOptions" ng-required="true"
                                   close-text="关闭"/>
                        </div>
                        <span style="vertical-align: -webkit-baseline-middle;">至</span>
                        <div style="display: inline" ng-controller="DatepickerDemoCtrl">
                            <input id="searchEnd" style="width:80px;float: right" readonly style="margin-left: 15px;" type="text" class="form-control input-sm w-sm inline m-r"
                                   datepicker-popup="{{format}}" ng-model="dt" is-open="opened"
                                   datepicker-options="dateOptions" ng-required="true"
                                   close-text="关闭" ng-click="open($event)"/>
                        </div>
                    </td>
                    <td class="myLabel">供应商</td>
                    <td>
                        <input id="searchGys" placeholder="点击选择" ng-click="showSelectCustomer('searchGys')" readonly type="text" class="form-control input-sm w-sm inline m-r"/>
                    </td>
                </tr>
                <tr>
                    <td class="myLabel">单据总金额</td>
                    <td>
                        <input id="searchJeStart" style="width:30%" type="text" class="form-control input-sm w-sm inline m-r"/>
                        至<input id="searchJeEnd" style="margin-left: 15px;width:30%" type="text" class="form-control input-sm w-sm inline m-r"/>
                    </td>
                    <td class="myLabel">单据编码</td>
                    <td><input id="searchBm" type="text" class="form-control input-sm w-sm inline m-r"/></td>
                    <td class="myLabel">货品名称</td>
                    <td>
                        <input placeholder="点击选择" id="searchHpmc" ng-click="showSelectGoods(null,null,'searchHpmc')" readonly type="text" class="form-control input-sm w-sm inline m-r"/>
                        <input id="searchHpmcId" style="display:none" type="text"/>
                    </td>
                </tr>
                <tr>
                    <td class="myLabel">订单编码</td>
                    <td colspan="3"><input id="searchOrderBm" type="text" class="form-control input-sm w-sm inline m-r"/></td>
                    <td class="myLabel" colspan="2">
                        <button ng-click="actions.search()" style="float: left;" class="btn m-b-xs btn-sm btn-default btn-addon">
                            <i class="fa fa-search"></i>搜索
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div>
            <table id="tableToExcel" class="table m-b-none">
                <thead>
                <tr>
                    <th>{{columns[0].title}}</th>
                    <th>{{columns[1].title}}</th>
                    <th>{{columns[2].title}}</th>
                    <th>{{columns[3].title}}</th>
                    <th>{{columns[4].title}}</th>
                    <th>{{columns[5].title}}</th>
                    <th>{{columns[6].title}}</th>
                    <th>{{columns[7].title}}</th>
                    <th>{{columns[8].title}}</th>
                    <th>{{columns[9].title}}</th>
                    <th>{{columns[10].title}}</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat-start="tb in saveDate">
                    <td>{{tb.createTime}}</td>
                    <td><a href ng-click="showInfo(tb)"><u>{{tb.purchaseReturnNumber}}</u></a></td>
                    <td>{{tb.purchaseReturnDdbh}}</td>
                    <td>{{tb.purchaseReturnGys}}</td>
                    <td>{{tb.purchaseReturnThrq}}</td>
                    <td data-value="1"><span class="{{tb.status1}}" title="Active">{{tb.state}}</span></td><td>{{tb.showZje}}</td>
                    <td>---</td>
                    <td>{{tb.zje}}</td>
                    <td>{{tb.zsl}}</td>
                    <td style="cursor: pointer" ng-click="actions.showListDetails(tb)"><i class="fa fa-plus"></i></td>
                </tr>
                <tr class="{{tb.purchaseReturnId}}" style="background-color: #f7f7f7;" ng-repeat-end ng-repeat="de in tb.details">
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>{{de.purchasegoodsdetailsHpmc}}</td>
                    <td>{{de.purchasegoodsdetailsHpzje}}</td>
                    <td>{{de.purchasegoodsdetailsHpsl}}</td>
                    <td></td>
                </tr>
                <tr style="background-color:rgb(209, 219, 222);">
                    <td>合计</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td>{{heji.ddje}}</td>
                    <td></td>
                    <td>{{heji.jehj}}</td>
                    <td>{{heji.sl}}</td>
                    <td></td>
                </tr>
                </tbody>
            </table>


        </div>
    </div>
    <div ng-if="warehouseAdd && canEdit" class="panel panel-default">
        <div class="panel-heading">
            <u style="cursor:pointer" ng-if="app.power.powerPurchasingReturn" ng-click="warehouseJump('back')">{{title.title}} / </u>{{title.addTitle}}
            <button ng-click="myPrintShow()" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-print"></i>打印
            </button>
            <button ng-if="row.upDateUserId===app.userIdId && row.state!=='提单'" ng-click="saveInfo('sm','th')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-danger btn-addon">
                <i class="fa fa-circle"></i>退回
            </button>
            <button ng-if="row.upDateUserId==='new' || row.upDateUserId===app.userIdId" ng-click="saveInfo('sm','tj')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-info btn-addon">
                <i class="fa fa-play"></i>提交
            </button>
            <button ng-if="row.upDateUserId==='new' || row.upDateUserId===app.userIdId" ng-click="saveInfo('sm','bc')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-primary btn-addon">
                <i class="fa fa-plus"></i>保存
            </button>
            <button ng-if="app.power.powerPurchasingReturn" ng-click="warehouseJump('back')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-hand-o-left"></i>返回
            </button>
        </div>
        <div class="panel-body">
            <h3 style="text-align: center"><b>采购退货单</b></h3>
            <form class="form-horizontal" method="get">
                <h7><b>单据基本信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">制&nbsp;&nbsp;单&nbsp;&nbsp;人</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" id="zdr" value="{{row.zdr}}">
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-1">制单日期</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" ng-required="true" id="createTime" value="{{row.createTime}}"/>

                    </div>
                    <label class="col-sm-1 control-label" for="input-id-1"><span style="color:red">*</span>单据编码</label>
                    <div class="col-sm-3">
                        <input readonly type="text" class="form-control" id="purchaseReturnNumber" value="{{row.purchaseReturnNumber}}">
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-3">订单编号</label>
                    <div class="col-sm-3">
                        <input disabled style="width:84%;float: left" type="text" class="form-control" id="purchaseReturnDdbh" value="{{row.purchaseReturnDdbh}}">
                        <span class="input-group-btn">
                                <button ng-click="showSelectOrder()" class="btn btn-default" type="button"><i class="fa fa-plus"></i></button>
                        </span>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-2"><span style="color:red">*</span>供&nbsp;&nbsp;应&nbsp;&nbsp;商</label>
                    <div class="col-sm-3">
                        <input disabled style="width:84%;float: left" type="text" class="form-control" id="purchaseReturnGys" value="{{row.purchaseReturnGys}}">
                        <span class="input-group-btn">
                            <button ng-click="showSelectCustomer('purchaseReturnGys')" class="btn btn-default" type="button"><i class="fa fa-plus"></i></button>
                        </span>
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4"><span style="color:red">*</span>退货日期</label>
                    <div class="col-sm-3" ng-controller="DatepickerDemoCtrl">
                        <input readonly style="width:84%;float: left" id="purchaseReturnThrq" value="{{row.purchaseReturnThrq}}" type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" datepicker-options="dateOptions" ng-required="true" close-text="关闭" />
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
                    <div class="col-sm-11">
                        <textarea type="text" class="form-control" id="purchaseReturnThsm" value="{{row.purchaseReturnThsm}}"></textarea>
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <h7><b>货品明细信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div style="height: 35px;">
                    <button ng-click="addRows()" style="" class="btn m-b-xs btn-sm btn-success btn-addon">
                        <i class="fa fa-plus"></i>增加
                    </button>
                    <button ng-click="plsc()" style="" class="btn m-b-xs btn-sm btn-danger btn-addon">
                        <i class="fa fa-minus"></i>批量删除
                    </button>
                </div>
            </form>
            <table class="table m-b-none" style="border:1px solid #eaeff0;" border="" cellspacing="0px" cellpadding="0px" width="100%">
                <thead>
                <tr>
                    <th rowspan="2"><input class="checkbox" type="checkbox" ng-click="qx()"/></th>
                    <th style="vertical-align: middle;white-space:nowrap;" colspan="3">货品信息</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">单位</th>
                    <th style="vertical-align: middle;white-space:nowrap;width: 10%;" rowspan="2">数量</th>
                    <th ng-if="app.power.powerPrice" style="vertical-align: middle;white-space:nowrap;" rowspan="2">单价</th>
                    <th ng-if="app.power.powerPrice" style="vertical-align: middle;white-space:nowrap;" rowspan="2">总金额</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">退货日期</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">备注</th>
                    <th style="vertical-align: middle;white-space:nowrap" rowspan="2">操作</th>
                </tr>
                <tr>
                    <th style="vertical-align: middle;white-space:nowrap;">货品编码</th>
                    <th style="vertical-align: middle;white-space:nowrap;">货品名称</th>
                    <th style="vertical-align: middle;white-space:nowrap;">规格型号</th>
                </tr>
                </thead>
                <tbody id="table">
                <tr ng-repeat="g in goods">
                    <td><input type="checkbox" name="ck" ng-click="ck($index)"></td>
                    <td>
                        <a href=""  ng-click="showSelectGoods(g,$index)" class="active" ui-toggle-class="">
                            <i class="fa fa-plus" id="{{g.purchasegoodsdetailsId}}purchasegoodsdetailsHpbm">{{g.purchasegoodsdetailsHpbm}}</i>
                        </a>
                    </td>
                    <td>{{g.purchasegoodsdetailsHpmc}}</td>
                    <td>{{g.purchasegoodsdetailsGgxh}}</td>
                    <td>{{g.purchasegoodsdetailsHpdw}}</td>
                    <td><input ng-model="goods[$index].purchasegoodsdetailsHpsl" ng-change="detailsInput.sl($index)" id="{{g.purchasegoodsdetailsId}}purchasegoodsdetailsHpsl" type="text" class="form-control" value="{{g.purchasegoodsdetailsHpsl}}"></td>
                    <td ng-if="app.power.powerPrice"><a href=""  ng-click="SelectPrice($index,g)" class="active" ui-toggle-class="">
                        <i class="fa fa-plus" id="{{g.purchasegoodsdetailsId}}purchasegoodsdetailsHpdj">{{g.purchasegoodsdetailsHpdj}}</i>
                    </a></td>
                    <td ng-if="app.power.powerPrice">{{g.purchasegoodsdetailsHpzje}}</td>
                    <td><div ng-controller="DatepickerDemoCtrl">
                        <input
                                style="width:64%;float: left" type="text"
                                id="{{g.purchasegoodsdetailsId}}purchasegoodsdetailsDhrq"
                                class="form-control"
                                datepicker-popup="{{format}}" ng-model="dt" is-open="opened"
                                datepicker-options="dateOptions" ng-required="true"
                                close-text="关闭"
                                value="{{g.purchasegoodsdetailsDhrq}}"/>
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div></td>
                    <td><input ng-model="goods[$index].purchasegoodsdetailsBz" ng-change="detailsInput.bz($index)" type="text" class="form-control" id="{{g.purchasegoodsdetailsId}}purchasegoodsdetailsBz" value="{{g.purchasegoodsdetailsBz}}"></td>
                    <td>
                        <a ng-click="dele($index)" class="active" ui-toggle-class="">
                            <i class="fa fa-times text-danger text-active"></i>
                        </a>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <div class="form-group">
                <label class="col-sm-1 control-label" for="input-id-1">上传附件</label>
                <div class="col-sm-4">
                    <!--onchange='angular.element(this).scope().upFile(this)'-->
                    <input id="uploadFile"  ng-src={{files[0].name}} id="file" ui-jq="filestyle" type="file" data-icon="false" data-classButton="btn btn-default" data-classInput="form-control inline v-middle input-s">
                </div>
                <button type="button" class="btn btn-primary update-button" style="" ng-click="upFile()">
                    添加
                </button>
            </div>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <div ng-if="showFiles.length!==0" class="hbox hbox-auto-xs hbox-auto-sm"  >
                <div class="col">
                    <div class="wrapper-md">
                        <table class="table bg-white-only b-a">
                            <thead>
                            <tr>
                                <th width="50%">文件名称</th>
                                <th>大小</th>
                                <th>进度</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="item in showFiles">
                                <td><strong>{{ item.myFileRealName }}</strong></td>
                                <td nowrap>{{ item.myFileSize/1024/1024|number:2 }} MB</td>
                                <td>
                                    <div class="progress progress-sm m-b-none m-t-xs">
                                        <div class="progress-bar bg-info" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                    </div>
                                </td>
                                <td class="text-center">
                                    <span ng-show="item.isSuccess" class="text-success"><i class="glyphicon glyphicon-ok"></i></span>
                                    <!--<span ng-show="item.isCancel" class="text-warning"><i class="glyphicon glyphicon-ban-circle"></i></span>-->
                                    <span ng-show="item.isError" class="text-danger"><i class="glyphicon glyphicon-remove"></i></span>
                                </td>
                                <td nowrap>
                                    <button type="button" class="btn btn-default btn-xs" ng-click="doupFile($index)" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                                        上传
                                    </button>
                                    <button type="button" class="btn btn-default btn-xs" ng-click="" ng-disabled="!item.isCancel">
                                        <a download="" title="下载文件" href = '/a_yongan/upload/{{item.myFileType}}/{{item.myFileDocNumber}}/{{item.myFileName}}'>下载</a>
                                    </button>
                                    <button type="button" class="btn btn-default btn-xs" ng-click="deleteFile($index)">
                                        移除
                                    </button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </div>
            <h7><b><a ng-click="showFlowDetails()">流转信息&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-sort-amount-asc"></i></a></b></h7>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <table ng-if="showFlowDetailsShow" class="table m-b-none" >
                <thead>
                <tr>
                    <th>序号</th>
                    <th>审批环节</th>
                    <th>审批人</th>
                    <th>审批记录</th>
                    <th>操作时间</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="t in showFlowDetailsData">
                    <td>{{$index+1}}</td>
                    <td>{{t.prFlowName}}</td>
                    <td>{{t.prUser}}</td>
                    <td>{{t.prType}}至{{t.prFlowToName}}（{{t.prToUser}}）</td>
                    <td>{{t.createTime}}</td>
                </tr>
                </tbody>
            </table>
        </div>

    </div>
    <div ng-if="warehouseAdd && (!canEdit)" id="noEdit" class="panel panel-default">
        <div class="panel-heading">
            <u style="cursor:pointer" ng-if="app.power.powerPurchasingReturn" ng-click="warehouseJump('back')">{{title.title}} / </u>{{title.addTitle}}
            <button ng-click="myPrintShow()" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-print"></i>打印
            </button>
            <button ng-if="row.upDateUserId===app.userIdId && row.state!=='提单'" ng-click="saveInfo('sm','th')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-danger btn-addon">
                <i class="fa fa-circle"></i>退回
            </button>
            <button ng-if="row.upDateUserId==='new' || row.upDateUserId===app.userIdId" ng-click="saveInfo('sm','tj')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-info btn-addon">
                <i class="fa fa-play"></i>提交
            </button>
            <button ng-if="app.power.powerPurchasingReturn" ng-click="warehouseJump('back')" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-hand-o-left"></i>返回
            </button>
        </div>
        <div class="panel-body">
            <h3 style="text-align: center"><b>采购退货单</b></h3>
            <form class="form-horizontal" method="get">
                <h7><b>单据基本信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">制&nbsp;&nbsp;单&nbsp;&nbsp;人</label>
                    <div class="col-sm-3">
                        {{row.zdr}}
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-1">制单日期</label>
                    <div class="col-sm-3">
                        {{row.createTime}}
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-1">单据编码</label>
                    <div class="col-sm-3">
                        {{row.purchaseReturnNumber}}
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-3">订单编号</label>
                    <div class="col-sm-3">
                        {{row.purchaseReturnDdbh}}
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-2">供&nbsp;&nbsp;应&nbsp;&nbsp;商</label>
                    <div class="col-sm-3">
                        {{row.purchaseReturnGys}}
                    </div>
                    <label class="col-sm-1 control-label" for="input-id-4">退货日期</label>
                    <div class="col-sm-3">
                        {{row.purchaseReturnThrq}}
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-1 control-label" for="input-id-1">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
                    <div class="col-sm-11">
                        {{row.purchaseReturnThsm}}
                    </div>
                </div>

                <div class="line line-dashed b-b line-lg pull-in"></div>
                <h7><b>货品明细信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </form>
            <table class="table m-b-none" style="border:1px solid #eaeff0;" border="" cellspacing="0px" cellpadding="0px" width="100%">
                <thead>
                <tr>
                    <th style="vertical-align: middle;white-space:nowrap;" colspan="3">货品信息</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">单位</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">数量</th>
                    <th ng-if="app.power.powerPrice" style="vertical-align: middle;white-space:nowrap;" rowspan="2">单价</th>
                    <th ng-if="app.power.powerPrice" style="vertical-align: middle;white-space:nowrap;" rowspan="2">总金额</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">退货日期</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">备注</th>
                </tr>
                <tr>
                    <th style="vertical-align: middle;white-space:nowrap;">货品编码</th>
                    <th style="vertical-align: middle;white-space:nowrap;">货品名称</th>
                    <th style="vertical-align: middle;white-space:nowrap;">规格型号</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="g in goods">
                    <td>{{g.purchasegoodsdetailsHpbm}}</td>
                    <td>{{g.purchasegoodsdetailsHpmc}}</td>
                    <td>{{g.purchasegoodsdetailsGgxh}}</td>
                    <td>{{g.purchasegoodsdetailsHpdw}}</td>
                    <td>{{g.purchasegoodsdetailsHpsl}}</td>
                    <td ng-if="app.power.powerPrice">{{g.purchasegoodsdetailsHpdj}}</td>
                    <td ng-if="app.power.powerPrice">{{g.purchasegoodsdetailsHpzje}}</td>
                    <td>{{g.purchasegoodsdetailsDhrq}}</td>
                    <td>{{g.purchasegoodsdetailsBz}}</td>
                </tr>
                </tbody>
            </table>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <div ng-if="showFiles.length!==0" class="hbox hbox-auto-xs hbox-auto-sm"  >
                <div class="col">
                    <div class="wrapper-md">
                        <table class="table bg-white-only b-a">
                            <thead>
                            <tr>
                                <th width="50%">文件名称</th>
                                <th>大小</th>
                                <th>进度</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="item in showFiles">
                                <td><strong>{{ item.myFileRealName }}</strong></td>
                                <td nowrap>{{ item.myFileSize/1024/1024|number:2 }} MB</td>
                                <td>
                                    <div class="progress progress-sm m-b-none m-t-xs">
                                        <div class="progress-bar bg-info" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                    </div>
                                </td>
                                <td class="text-center">
                                    <span ng-show="item.isSuccess" class="text-success"><i class="glyphicon glyphicon-ok"></i></span>
                                    <!--<span ng-show="item.isCancel" class="text-warning"><i class="glyphicon glyphicon-ban-circle"></i></span>-->
                                    <span ng-show="item.isError" class="text-danger"><i class="glyphicon glyphicon-remove"></i></span>
                                </td>
                                <td nowrap>
                                    <button type="button" class="btn btn-default btn-xs" ng-click="" ng-disabled="!item.isCancel">
                                        <a download="" title="下载文件" href = '/a_yongan/upload/{{item.myFileType}}/{{item.myFileDocNumber}}/{{item.myFileName}}'>下载</a>
                                    </button>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </div>
            <h7><b><a ng-click="showFlowDetails()">流转信息&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-sort-amount-asc"></i></a></b></h7>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <table ng-if="showFlowDetailsShow" class="table m-b-none" >
                <thead>
                <tr>
                    <th>序号</th>
                    <th>审批环节</th>
                    <th>审批人</th>
                    <th>审批记录</th>
                    <th>操作时间</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="t in showFlowDetailsData">
                    <td>{{$index+1}}</td>
                    <td>{{t.prFlowName}}</td>
                    <td>{{t.prUser}}</td>
                    <td>{{t.prType}}至{{t.prFlowToName}}（{{t.prToUser}}）</td>
                    <td>{{t.createTime}}</td>
                </tr>
                </tbody>
            </table>
        </div>

    </div>
    <div ng-if="isPrint" class="panel panel-default">
        <div class="panel-heading">
            <u>{{title.title}}</u> / {{title.addTitle}}
            <button ng-click="myPrint()" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-print"></i>打印
            </button>
            <button ng-click="myPrintShow()" style="float: right;margin-top: -5px;margin-left: 5px;" class="btn m-b-xs btn-sm btn-default btn-addon">
                <i class="fa fa-hand-o-left"></i>返回
            </button>
        </div>
        <div class="panel-body" id="orderPrint">
            <h3 style="text-align: center"><b>采购退货单</b></h3>
            <form class="form-horizontal" method="get">
                <h7><b>单据基本信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <table class="table m-b-none" style="border:1px solid #eaeff0;" border="" cellspacing="0px" cellpadding="0px" width="100%">
                    <tbody>
                    <tr>
                        <td style="width:20%">制&nbsp;&nbsp;单&nbsp;&nbsp;人</td><td style="width:30%">{{row.zdr}}</td>
                        <td style="width:20%">制单日期</td><td style="width:30%">{{row.createTime}}</td>
                    </tr>
                    <tr>
                        <td>单据编码</td><td>{{row.purchaseReturnNumber}}</td>
                        <td>订单编号</td><td>{{row.purchaseReturnDdbh}}</td>
                    </tr>
                    <tr>
                        <td>供  应  商</td><td>{{row.purchaseReturnGys}}</td>
                        <td>退货日期</td><td>{{row.purchaseReturnThrq}}</td>
                    </tr>
                    <tr>
                        <td>备        注</td><td colspan="3">{{row.purchaseReturnThsm}}</td>
                    </tr>
                    </tbody>
                </table>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <h7><b>货品明细信息</b></h7>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </form>
            <table class="table m-b-none" style="border:1px solid #eaeff0;" border="" cellspacing="0px" cellpadding="0px" width="100%">
                <thead>
                <tr>
                    <th style="vertical-align: middle;white-space:nowrap;" colspan="3">货品信息</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">单位</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">数量</th>
                    <th ng-if="app.power.powerPrice" style="vertical-align: middle;white-space:nowrap;" rowspan="2">单价</th>
                    <th ng-if="app.power.powerPrice" style="vertical-align: middle;white-space:nowrap;" rowspan="2">总金额</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">退货日期</th>
                    <th style="vertical-align: middle;white-space:nowrap;" rowspan="2">备注</th>
                </tr>
                <tr>
                    <th style="vertical-align: middle;white-space:nowrap;">货品编码</th>
                    <th style="vertical-align: middle;white-space:nowrap;">货品名称</th>
                    <th style="vertical-align: middle;white-space:nowrap;">规格型号</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="g in goods">
                    <td>{{g.purchasegoodsdetailsHpbm}}</td>
                    <td>{{g.purchasegoodsdetailsHpmc}}</td>
                    <td>{{g.purchasegoodsdetailsGgxh}}</td>
                    <td>{{g.purchasegoodsdetailsHpdw}}</td>
                    <td>{{g.purchasegoodsdetailsHpsl}}</td>
                    <td ng-if="app.power.powerPrice">{{g.purchasegoodsdetailsHpdj}}</td>
                    <td ng-if="app.power.powerPrice">{{g.purchasegoodsdetailsHpzje}}</td>
                    <td>{{g.purchasegoodsdetailsDhrq}}</td>
                    <td>{{g.purchasegoodsdetailsBz}}</td>
                </tr>
                </tbody>
            </table>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <div ng-if="showFiles.length!==0" class="hbox hbox-auto-xs hbox-auto-sm"  >
                <div class="col">
                    <div class="wrapper-md">
                        <table class="table bg-white-only b-a">
                            <thead>
                            <tr>
                                <th width="50%">文件名称</th>
                                <th>大小</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="item in showFiles">
                                <td><strong>{{ item.myFileRealName }}</strong></td>
                                <td nowrap>{{ item.myFileSize/1024/1024|number:2 }} MB</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
            </div>
            <h7><b><a>流转信息&nbsp;&nbsp;&nbsp;&nbsp;<i class="fa fa-sort-amount-asc"></i></a></b></h7>
            <div class="line line-dashed b-b line-lg pull-in"></div>
            <table ng-if="showFlowDetailsData.length!=0" class="table m-b-none" >
                <thead>
                <tr>
                    <th>序号</th>
                    <th>审批环节</th>
                    <th>审批人</th>
                    <th>审批记录</th>
                    <th>操作时间</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="t in showFlowDetailsData">
                    <td>{{$index+1}}</td>
                    <td>{{t.prFlowName}}</td>
                    <td>{{t.prUser}}</td>
                    <td>{{t.prType}}至{{t.prFlowToName}}（{{t.prToUser}}）</td>
                    <td>{{t.createTime}}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

<script type="text/ng-template" id="myModalContent.html">
    <div ng-include="'tpl/modal.html'"></div>
</script>

<script type="text/ng-template" id="selectCustomer.html">
    <div ng-include="'tpl/selectCustomer.html'"></div>
</script>
<script type="text/ng-template" id="selectGoods.html">
    <div ng-include="'tpl/selectGoods.html'"></div>
</script>
<script type="text/ng-template" id="selectPurchaseOrder.html">
    <div ng-include="'tpl/selectPurchaseOrder.html'"></div>
</script>
<script type="text/ng-template" id="selectPrice.html">
    <div ng-include="'tpl/selectPrice.html'"></div>
</script>
<script type="text/ng-template" id="selectUser.html">
    <div ng-include="'tpl/selectUser.html'"></div>
</script>
<style>
    #noEdit .col-sm-3{
        padding-top: 7px;
    }
</style>